# Makefile for zlib
# Copyright (C) 1995-2010 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h

CC=gcc

CFLAGS=-O3 -D_LARGEFILE64_SOURCE=1
SFLAGS=-O3 -fPIC -D_LARGEFILE64_SOURCE=1
LDFLAGS= -L. libz.a
TEST_LDFLAGS=-L. libz.a
LDSHARED=gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
CPP=gcc -E

STATICLIB=libz.a

AR=ar rc
RANLIB=ranlib
LDCONFIG=ldconfig
LDSHAREDLIBC=-lc
TAR=tar
SHELL=/bin/sh
EXE=
OBJDIR=./obj

OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
	gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o

# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
OBJA =

OBJS = $(OBJC) $(OBJA)

all: zlib

zlib: $(OBJS)
	@mv *.o $(OBJDIR)

libz.a: $(OBJS)
	$(AR) $@ $(OBJS)
	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1

mostlyclean: clean
clean:
	rm -f $(OBJDIR)/*.o *~ libz.*  

# DO NOT DELETE THIS LINE -- make depend depends on it.
adler32.o zutil.o: zutil.h zlib.h zconf.h
gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h
compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h
crc32.o: zutil.h zlib.h zconf.h crc32.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h

